package com.my.spring.boot.ctrl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.my.spring.boot.entiy.User;
import com.my.spring.boot.service.UserService;

@Controller
public class UserCtrl {
	private Logger logger = Logger.getLogger(UserCtrl.class);

    @Autowired
    private UserService userService;

    @RequestMapping("/getUserInfo")
    @ResponseBody
    public List<User> getUserInfo() {
        List<User> user = null;//userService.findUserInfo();
//        if(user!=null){
//            System.out.println("user.getName():"+user.size());
//            logger.info("user.getAge():"+user.size());
//        }
        return user;
    }
}
